package com.yenlien.traceyun.control.entity;

import com.yenlien.traceyun.webase.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @author: bigwangy@sina.com
 * @create: 2020-11-18
 * @description:模型分类
 **/

@Entity
@Table(name = "t_model_category")
public class ModelCategory extends BaseEntity {

    /**
     * 分类名称
     */
    @Column(name = "name", length = 50, unique = true)
    private String name;

    /**
     * 排序
     */
    @Column(name = "sort_num", length = 50)
    private int sortNum;

    /**
     * 父
     */
    @Column(name = "parent_id", length = 32)
    private String parentId;

    /**
     * 编码
     */
    @Column(name = "code", length = 50, unique = true)
    private String code;

    /**
     * 显示图片
     */
    @Column(name = "display_img", length = 50)
    private String displayImg;

    // 解决基源修改报错Bug  2021-04-26
    @Transient
    private String img;


    /**
     * 级别
     */
    @Column
    private int type;

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSortNum() {
        return sortNum;
    }

    public void setSortNum(int sortNum) {
        this.sortNum = sortNum;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDisplayImg() {
        return displayImg;
    }

    public void setDisplayImg(String displayImg) {
        this.displayImg = displayImg;
    }


    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
